In recent years, resistance random access memory (ReRAM) devices that store data by varying the resistance values of memory elements have been proposed. Several methods have been proposed for varying the resistance values of memory elements. One of these methods is to accumulate electrons in a metal layer sandwiched between insulating films to vary the energy of the metal layer, thereby varying the quantity of the tunnel current. This method poses the problem of minimizing erroneous writing during reading while maintaining the data retention characteristics.